package com.centerm.structure.dto;

import java.io.Serializable;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.centerm.common.constant.validate.Delete;
import com.centerm.common.constant.validate.Insert;
import com.centerm.common.constant.validate.Update;

/**
 * @ClassName UserInfo
 * @Description: 用户信息
 * @author czy
 * @date 2017年8月11日
 */
public class UserInfo implements Serializable{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = {Update.class,Delete.class})
    private Integer id;
	
	@NotBlank(groups = {Insert.class})
    private String uid;
	
	@NotBlank(groups = {Insert.class})
    private String name;
	
    private String likeName;
    
	@NotBlank(groups = {Insert.class})
    private String password;
	
	private Integer isManager;
	
	private String headImage;
	
    private Integer sex;

    private String email;

    private String phone;
    
    @NotNull(groups = {Insert.class})
    private Integer department;
    
    private String departmentName;

    private String description;

    private Integer valid;
    
    @Override
    public String toString() {
        return "UserInfo [id=" + id + ", uid=" + uid + ", name=" + name
                + ", likeName=" + likeName + ", password=" + password
                + ", isManager=" + isManager + ", headImage=" + headImage
                + ", sex=" + sex + ", email=" + email + ", phone=" + phone
                + ", department=" + department + ", departmentName="
                + departmentName + ", description=" + description + ", valid="
                + valid + "]";
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid == null ? null : uid.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public Integer getDepartment() {
        return department;
    }

    public void setDepartment(Integer department) {
        this.department = department;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public String getLikeName() {
		return likeName;
	}

	public void setLikeName(String likeName) {
		this.likeName = likeName;
	}

	public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

	public Integer getIsManager() {
		return isManager;
	}

	public void setIsManager(Integer isManager) {
		this.isManager = isManager;
	}

	public String getHeadImage() {
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}
}